package com.kymatrix.kycarbon.xsmd.common.business.mybatisplus;

import com.kymatrix.kycarbon.xsmd.common.mybatisplus.service.ITableFill;
import com.kymatrix.kycarbon.xsmd.common.springsecurity.SecurityUtils;
import org.springframework.stereotype.Component;

/**
 * @author liujie
 * @date 2024-03-30
 */
@Component
public class TableFillImpl implements ITableFill {
    
    
    @Override
    public String getCreator() {
        String loginUsername = SecurityUtils.getLoginUsername();
        return loginUsername == null ? "anonymousUser" : loginUsername;
    }

    @Override
    public String getUpdater() {
        String loginUsername = SecurityUtils.getLoginUsername();
        return loginUsername == null ? "anonymousUser" : loginUsername;
    }
}
